<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html class=" js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg no-smil svgclippaths">

	<head>
		<meta charset="utf-8" />
		<title>XToolsCRM - easy to Power</title>
		<link rel="stylesheet" href="css/returnsaledetail.css">

		<script src="http://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<!-- 引入样式 -->
		<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
		<!-- 引入组件库 -->
		<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript" src="../js/axios.js"></script>
<script type="text/javascript" src="../js/qs.js"></script>
		
		
		
	</head>

	<body class="fixed-left">

		<div class="enlarged forced" id="wrapper">
			<!-- ============================================================== -->
			<!-- 右侧主体内容开始-->
			<!-- ============================================================== -->
			<div class="content-page crm">
				<div class="content">
					<div class="container-fluid" style="min-height: 900px;">
						<div class="row">
							<!--这里是总的div放所有内容的-->
							<div class="allBaBox">
								<el-form :model="ruleForm" ref="ruleForm" class="demo-ruleForm">

									<div class="col-sm-12">
										<!----------------筛选、查询input代码开始-------------------->
										<div id="search" style="z-index:0">
											<div id="editsublayer" style="position:absolute; visibility:hidden;&#9;left:0;&#9;top:0; width:0;&#9;height:0; z-index:100; background-color:#D4D0C8; ">
												<iframe name="qssub" src="/a.html" style="width: 0; height: 0; border: 0;"></iframe>
											</div>
											<form name="qsearch" class="form-inline" role="form" onsubmit="hideDiv(); return true;" action="/system/qssub.xt" method="POST" target="qssub" novalidate="">

												<div class="form-group ">
													<label class="control-label col-sm-2 m-t-10"><i class="fa fa-filter m-r-5"></i></label>
													<div class="col-sm-10">
														<div class="btn-group bootstrap-select form-control show-tick"><!--搜索栏前提条件那块-->
													<div class="box">
														
														<el-select v-model="ruleForm.selects" slot="prepend"
															clearable placeholder="全部数据"
															style="background: #ccc;width: 113px;">  </el-select>


													</div>
													
														</div>
													</div>

													<input name="dtname" type="hidden" value="rtnitem"><input name="mdb" type="hidden" value="022c0e4cf979ad4d9ae1d089e43bb2c9"><input name="comname" type="hidden" value="search">
													<input name="qsnum" type="hidden" value="1">
													<input name="qsnumt" type="hidden" value="">
													<input name="seno" type="hidden" value="0">
													<input name="sel" type="hidden" value="">
												</div>
												<div style="position:absolute; visibility:hidden;left:0;top:0; width:0;height:0; z-index:100; background-color:#D4D0C8; ">
													<textarea name="ids" rows="2" cols="20"></textarea>
												</div>
												<div class="form-group">
													
												<!--搜索栏那一块-->
											<div class="box2"
												style="width: 300px; height: 40px; margin-top: 5px;">
												<el-input placeholder="请输入内容" v-model="ruleForm.selectinput">

												<el-button slot="prepend" icon="el-icon-search"
													@click="submitForm('ruleForm')"></el-button> <!-- <template
													slot="append"> 
													<el-select v-model="ruleForm.selectend" 
													clearable placeholder="请选择" style="width: 100px;">
														<el-option v-for="item in options" :key="item.value"
													   :label="item.label" :value="item.value">
													   </el-option>
													 </el-select>
												 </template>  --> </el-input>

											</div>

												</div>

											</form>
											<!--UTF8-->
										</div>

										<!----------------列表-------------------->

										<div id="qlist" style="z-index:0">
											<div id="editqlist" style="position:absolute; display:none;&#9;left:0;&#9;top:0; width:0;&#9;height:0; z-index:100; background-color:#D4D0C8; "><iframe name="editsubqlist" width="1" height="1" src="/a.html" frameborder="0" scrolling="no"></iframe></div>
											<form name="formedit_qlist" action="/system/alldel.xt" method="POST" target="editsubqlist" novalidate=""><input name="mdb" type="hidden" value="022c0e4cf979ad4d9ae1d089e43bb2c9"><input name="db" type="hidden" value="rtnitem"><input name="cn" type="hidden" value="qlist">
												<div class="row m-t-15 f-s-12" style="height: 35px;">
													<div class="col-sm-6">
														<span set-lan="html:退货单明细">退货记录</span>
														<small class="text-muted font-13">共{{ruleForm.totalCount}}条</small>

													</div>
													<div class="col-sm-6 text-right">

												<!-- 新建那塊 -->
												<el-button class="btn btn-white waves-effect waves-light" type="text" @click="centerDialogVisible = true" style="width:70px; height:40px;color:#000;text-align:center">新建退货</el-button>

													<!--中间表单弹出层-->
													<el-dialog title="新建退货" :visible.sync="centerDialogVisible" width="900px" center>

														<iframe src="returnFrames" width="850" style="height: 930px;text-align: center;" frameborder="0" scrolling="no"></iframe>

													</el-dialog>

													</div>
												</div>

												<div class="tab-content p-0">
													<div class="bootstrap-table m-t-10">
														<div class="fixed-table-container overflow-x-auto">
															<table class="table table-bordered table-hover table-z" id="qlist_table">
																<thead>
																	<tr>
																		

																		<th class="th-inner">
																			<p align="left">
																				<a class="na" href="JavaScript:qlist_argv_orderf='rtn_id'; qlist_argv_orderv=0;qlist_load();" set-lan="html:退货单">退货单</a>
																			</p>
																		</th>
																		<th class="th-inner">
																			<p align="left">
																				<a class="na" href="JavaScript:qlist_argv_orderf='pid'; qlist_argv_orderv=0;qlist_load();" set-lan="html:产品名称">产品名称</a>
																			</p>
																		</th>
																		<th class="th-inner">
																			<p align="left">
																				<a class="na" href="JavaScript:qlist_argv_orderf='reason'; qlist_argv_orderv=0;qlist_load();" set-lan="html:退货原因">退货原因</a>
																			</p>
																		</th>
																		<th class="th-inner">
																			<p align="left">
																				<a class="na" href="JavaScript:qlist_argv_orderf='rnum'; qlist_argv_orderv=0;qlist_load();" set-lan="html:退货数量">退货数量</a>
																			</p>
																		</th>
																		<th class="th-inner">
																			<p align="left">
																				<a class="na" href="JavaScript:qlist_argv_orderf='rsum'; qlist_argv_orderv=0;qlist_load();" set-lan="html:退货金额">退货时间</a>
																			</p>
																		</th>
																		<th class="th-inner">
																			<p align="left">
																				<a class="na" href="JavaScript:qlist_argv_orderf='nin'; qlist_argv_orderv=0;qlist_load();" set-lan="html:已入库数量">负责人</a>
																			</p>
																		</th>
																		<th class="th-inner">
																			<p align="left" set-lan="html:备注">备注</p>
																		</th>
																		<th class="th-inner">
																			</th>
																	</tr>
																</thead>
																<tbody class="bg-white">

																	<tr  v-for="(colle,i) in tableData">
																		
																		<td>
																			<p align="left"><span style="font-weight:normal;color:#9e9e9e">〖</span>订单:{{colle.otitle}}
																				<a :href="getOrderHref(colle.o_id)"><i class="fa fa-folder-open m-l-5" data-original-title="打开详细页面" data-toggle="tooltip" data-placement="bottom"></i></a><span style="font-weight:normal;color:#9e9e9e">〗</span></p>
																		</td>
																		<td>
																			<p align="left">{{colle.goo_name}}
																				<a href="javascript:vopen('/xcrm/market/product/detail.xt?id=103','product103',999,600);"><i class="fa fa-folder-open m-l-5" data-original-title="打开详细页面" data-toggle="tooltip" data-placement="bottom"></i></a>
																			</p>
																		</td>
																		<td>
																			<p align="left">{{colle.return_cause}}</p>
																		</td>
																		<td>
																			<p align="left">{{colle.return_num}}</p>
																		</td>
																	
																		<td>
																			<p align="left">{{colle.rtimes}}</p>
																		</td>
																		<td>
																			<p align="left">{{colle.use_name}}</p>
																		</td>
																		<td width="1%" nowrap="">{{colle.return_remark}}</td>
																	</tr>
														
																</tbody>
															</table>
														</div>
													</div>
													<div class="row m-t-10">
														<div class="col-sm-3">
																</div>
														<div class="col-sm-7 text-center">
															<!--分页-->
												<div class="col-sm-7 text-center box4">
													<div class="block">
														<el-pagination @size-change="handleSizeChange"
															@current-change="handleCurrentChange"
															:current-page="ruleForm.currentPage"
															:page-size="ruleForm.pagesize"
															layout="total, prev, pager, next, jumper"
															:total="ruleForm.totalCount"> </el-pagination>
													</div>
												</div>
												</div>

												<!--UTF8-->
											</form>
											<form name="outexcel" action="/sys/plist/listout.xt" method="POST" novalidate=""><input name="dt" type="hidden" value="rtnitem"><input name="w" type="hidden" value="a5gATPnFGbmRGI"><input name="dcr" type="hidden" value="c8242"></form>
											<form name="actname1" action="/sys/cupool/listout.xt" method="POST" novalidate=""><input name="dt" type="hidden" value="rtnitem"><input name="w" type="hidden" value="a5gATPnFGbmRGI"><input name="dcr" type="hidden" value="c8242"><input name="modparam" type="hidden" value=""></form>
										</div>
										<!----------------统计-------------------->

									</div>

								</el-form>
							</div>
							
							<script type="text/javascript">
							
							 
									var vm = new Vue({
										el: ".allBaBox",
										data: {
											allMoney:"",
											allhuikuan:"",
											allyeshuikuan:"",
											iframdilog:"",
											dialogVisible: false,
											select: "全部数据",
											options: [{
												value: '3001',
												label: '产品销售'
											}, {
												value: '3002',
												label: '服务'
											}, {
												value: '3003',
												label: '业务合作'
											}, {
												value: '3004',
												label: '代理分销'
											}],
											centerDialogVisible: false,
											//表格当前页数据
			               					tableData: [],
											ruleForm: {
											//下拉条件按钮
											selects: "全部数据",
												//搜索框
												selectinput: '',
												//下拉条件按钮
												selectend: '',
											    //默认每页数据量
				              				    pagesize:10,
				              				    //当前页码
				               				    currentPage: 1,
				               				    //默认数据总数
				              					totalCount: ''
						      				    },deletids:""
						      				   
										},
										methods: {
											//从服务器读取数据
							                loadData: function(pageNum, pageSize){  
							                	
							                	var iosnn=this;
							                	//post提交数据
												axios.post("/onSale/returnItem2sd",
													//参数转换
													Qs.stringify(this.ruleForm, {
														arrayFormat: 'brackets'
													})		
												).then(function(v) {
													//iosnn.tableData = v.data;
													iosnn.tableData = v.data.list;
													iosnn.ruleForm.totalCount = v.data.total;
													console.info(v.data.list); 
													 console.info(v.data); 
												}).catch(function(e) {
													alert("出错了"+e);
												});
							                },
							                handleSizeChange(val) {
												console.log('每页 ${val} 条');
												this.ruleForm.pagesize = val;
										        console.log( this.ruleForm.pagesize+'条');
										        //this.ruleFormloadData();
											},
											handleCurrentChange(val) {
												this.ruleForm.currentPage = val;
											    console.log(this.ruleForm.currentPage+'当前');
											    this.loadData();
											},
											submitForm(formName) {
												//验证方法
												this.$refs[formName].validate((valid) => {
													if(valid) {
														//alert("aa");
														this.loadData(this.currentPage, this.pagesize);
													} else {
														//alert("aa");
														console.log('error submit!!');
														return false;
													}
												});
											},getOrderHref(val){
												//alert(val);
												return 'shozhongordertwo2?oid='+val;
											}
										},
										mounted() {
											var mas=${mansitem};
											this.ruleForm.restaurants = mas;
											var ss=${userJson};
											console.log(ss); 
											var iosnn=this;
											//post提交数据
											axios.post("/onSale/returnItem",
												//参数转换
												Qs.stringify(this.ruleForm, {
													arrayFormat: 'brackets'
												})		
											).then(function(v) {
												iosnn.tableData = v.data.list;
												iosnn.ruleForm.totalCount = v.data.total;
												
												console.info(v.data); 
											}).catch(function(e) {
												alert("出错了"+e);
											});
											

										}
										
									})
								</script>

						</div>

					</div>

				</div>

			</div>

			<!-- ============================================================== -->
			<!-- 右侧主体内容结束 -->
			<!-- ============================================================== -->

		</div>
		<script src="http://cdn.xtcrm.com/cdn//v7/fm/ub/js/jquery.core.js"></script>
		<script src="http://cdn.xtcrm.com/cdn//v7/fm/ub/js/jquery.app.js"></script>
	</body>

</html>